package com.surprise.base.bo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * PageReq.java
 * @author nick
 * @since 2015年5月2日
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(of = { "start", "num" })
@NoArgsConstructor
@AllArgsConstructor
public class PageReq {
	private int start = 1;
	private int num = 20;
	private long timestamp = 0L;
	private String orderBy = "updatetime";
	private String order = "desc";
	
	public Page toPage() {
		return new Page().setStart(start).setNum(num).setTimestamp(timestamp);
	}
}
